/*
 * This header, excluding the #ifdef __KERNEL__ part, is BSD licensed so
 * anyone can use the definitions to implement compatible drivers/servers:
 *
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. Neither the name of IBM nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL IBM OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

#ifndef _LINUX_VIRTIO_QTBOX_ERRNO_H
#define _LINUX_VIRTIO_QTBOX_ERRNO_H

enum VIRTIO_QTBOX_STATUS {
	VIRTIO_QTBOX_OK		= 0,
	VIRTIO_QTBOX_ERR	= 256,
	VIRTIO_QTBOX_NOTSUPP	= 257,
	VIRTIO_QTBOX_EFAULT	= 258,
};

enum VIRTIO_QTBOX_SANDBOX_VM_CMD_STATUS {
	VIRTIO_QTBOX_SANDBOX_VM_SUCCESS				= 0,
	/* define instance */
	VIRTIO_QTBOX_SANDBOX_VM_ERR_INSTANCE_NOSPC		= 259,
	VIRTIO_QTBOX_SANDBOX_VM_ERR_NOTSUPP_MODE		= 260,
	VIRTIO_QTBOX_SANDBOX_VM_ERR_NOTSUPP_IMAGE		= 261,
	/* add rsources */
	VIRTIO_QTBOX_SANDBOX_VM_ERR_VCPU_ALREADY_USED		= 262,
	VIRTIO_QTBOX_SANDBOX_VM_ERR_VCPU_INVALID_ID		= 263,
	VIRTIO_QTBOX_SANDBOX_VM_ERR_VCPU_NOSPC			= 264,
	VIRTIO_QTBOX_SANDBOX_VM_ERR_MEM_REGION_ALREADY_USED	= 265,
	VIRTIO_QTBOX_SANDBOX_VM_ERR_MEM_INVALID_ADDR		= 266,
	VIRTIO_QTBOX_SANDBOX_VM_ERR_MEM_INVALID_SIZE		= 267,
	VIRTIO_QTBOX_SANDBOX_VM_ERR_MEM_NOSPC			= 268,
	VIRTIO_QTBOX_SANDBOX_VM_ERR_DEV_ALREADY_USED		= 269,
	VIRTIO_QTBOX_SANDBOX_VM_ERR_DEV_INVALID_BDF		= 270,
	VIRTIO_QTBOX_SANDBOX_VM_ERR_DEV_NOSPC			= 271,
	/* start instance */
	VIRTIO_QTBOX_SANDBOX_VM_ERR_START_NO_VCPU_ADDED		= 272,
	VIRTIO_QTBOX_SANDBOX_VM_ERR_START_NO_MEM_ADDED		= 273,
	VIRTIO_QTBOX_SANDBOX_VM_ERR_START_NO_DEV_ADDED		= 274,
	VIRTIO_QTBOX_SANDBOX_VM_ERR_START_INVALID_CID		= 275,
	VIRTIO_QTBOX_SANDBOX_VM_ERR_START_CID_ALREADY_USED	= 276,
	VIRTIO_QTBOX_SANDBOX_VM_ERR_START_LAUNCH_FAILED		= 277,
	/* stop instance */
	VIRTIO_QTBOX_SANDBOX_VM_ERR_STOP_ALREADY_STOPPED	= 278,
	/* add resources */
	VIRTIO_QTBOX_SANDBOX_VM_ERR_ADD_RES_ALREADY_LAUNCHED	= 279,
	/* common */
	VIRTIO_QTBOX_SANDBOX_VM_ERR_INVALID_SID			= 280,
	VIRTIO_QTBOX_SANDBOX_VM_ERR_INTERNAL_ERROR		= 281,
	VIRTIO_QTBOX_SANDBOX_VM_ERR_NOTSUPP_SUBCODE		= 282,
	VIRTIO_QTBOX_SANDBOX_VM_ERR_OPS_STATUS			= 283,
};

#endif
